package com.xiaoqi.springboot.controller;

import com.xiaoqi.springboot.bean.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author Rookie Coder
 * @Description
 * @Date
 **/
@Controller
public class UserController {

    @RequestMapping("/thymeleaf")
    public String userDetails(Model model){
        model.addAttribute("data","Thymeleaf模板引擎");
        return "message";
    }

    @RequestMapping("/thymeleaf2")
    public String userDetails1(Model model){
        User user = new User("xiaoqi",12,1);
        model.addAttribute("user",user);
        return "message";
    }

}
